package io.gitee.hefren.hhdemoapollo.conf;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

/**
 * @Date 2024/5/10
 * @Author lifei
 */
@Configuration
@ConfigurationProperties(prefix = "p")
//@RefreshScope
public class DemoPreConf {
    private String a;
    private String b;
    private Map<String, String> c = new HashMap<>();

    public String getA() {
        return a;
    }

    public void setA(String a) {
        this.a = a;
    }

    public String getB() {
        return b;
    }

    public void setB(String b) {
        this.b = b;
    }

    public Map<String, String> getC() {
        return c;
    }

    public void setC(Map<String, String> c) {
        this.c = c;
    }

    @Override
    public String toString() {
        return "DemoPreConf{" +
                "a='" + a + '\'' +
                ", b='" + b + '\'' +
                ", c=" + c +
                '}';
    }
}
